import { Base } from '../../../utils/base.js';
class HomeIndex extends Base {
  constructor() {
    super();
  }

  // coupon(data, callback) {  //获取优惠
  //   var param = {
  //     url: 'order/coupon',
  //     type: "post",
  //     loading: 'hide',
  //     data: data,
  //     sCallback: function (data) {
  //       callback && callback(data);
  //     }
  //   };
  //   this.request(param);
  // }

  exchange(data, callback) {  //自主兑换
    var param = {
      url: 'goods/exchange_coupon',
      type: "post",
      data: data,
      loading:'hide',
      sCallback: function (data) {
        callback && callback(data);
      }
    };
    this.request(param);
  }



  coupon(data, callback) {  //获取优惠
    var param = {
      url: 'user/coupon',
      type: "post",
      loading: 'hide',
      data: data,
      sCallback: function (data) {
        callback && callback(data);
      }
    };
    this.request(param);
  }
};
export { HomeIndex };



